home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / ANC_UTULITYS_16.adf / arclist / asm1.arc / CREAT.PAL.S < prev    next >
Text File  |  1988-09-21  |  3KB  |  93 lines

  1. **********************************************************************
  2. **                  HOW TO SHOW A PICTURE IN ASSEMBLER              **
  3. **          PLUS COPPER IN THE LOWER REGION OF THE SCREEN (PAL)     **
  4. **********************************************************************
  5.  
  6. s:
  7. move.l    #coplist,$dff080        ; Pointer to copperlist
  8.  
  9. ****************** FILL PICTURE WITH LINES *****************
  10.  
  11. move.l    #$60000,a0            ; Picture is here
  12. move.l    #$1f40,d0            ; Number of bytes large
  13. ClearLoop:
  14. move.b    #$ac,(a0)+            ; Store $ac in memory and
  15.                     ; add 1 to a0.
  16. dbf    d0,ClearLoop            ; Subtract 1 from D0, if not
  17.                     ; -1 then jump to 'ClearLoop'
  18.  
  19. WaitMouse:
  20. btst    #6,$bfe001
  21. bne.s    WaitMouse            ; Wait for mouse button
  22.  
  23. move.l    4,a6                ; AbsExecBase
  24. move.l    #0,d0                ; Take any version of graphlib
  25. move.l    #GraphLib,a1            ;Pointer to "graphics.library"
  26. jsr    -552(a6)            ; OpenLibrary
  27.  
  28. move.l    d0,a0                ; Start address of library
  29. move.l    $26(a0),$dff080            ; WB Screen copper pointer is
  30.                     ; in Start address+$26.
  31. move.l    #0,d0                ; Tells CLI we are OK.
  32. rts
  33.  
  34. GraphLib:dc "graphics.library",0    ; Tell computer what library
  35.                     ; we want to open.
  36.  
  37. even                    ; Copperlist must be at an
  38.                     ; EVEN address
  39.  
  40. CopList:                ; Copper list starts here
  41.  
  42. dc.w    $0180,$0000            ; $0180=0 (Background color)
  43. dc.w    $0182,$0fff            ; $0182=$fff (Color 1)
  44.  
  45. dc.w    $0100,$1200            ; $0100=$1200, Use 1 Bitplane
  46.                     ; LOW-RES.
  47. dc.w    $00e0,$0006
  48. dc.w    $00e2,$0000            ; First BitPlane is at $60000
  49.  
  50. dc.w    $008e,$2c81            ; Upper left corner of display
  51. ;   Upper Edge ^^ ^^ Left edge ($81)
  52. dc.w    $0090,$f4c1            ;Lower right corner of display
  53. ;   Lower edge ^^ ^^ Right edge ($c1)
  54.  
  55. dc.w    $0092,$0038            ; Should be this way
  56. dc.w    $0094,$00d0            ; if 320x200 display.
  57.  
  58. dc.w    $0108,$0000            ; Skip 0 bytes after
  59.                     ; a picture line has been
  60.                     ; drawn.
  61.  
  62. dc.w    $0102,$0000            ; No shift (scroll)
  63.  
  64. dc.w    $0120,$0000,$0122,$0000        ; Turn off sprite 0
  65. dc.w    $0124,$0000,$0126,$0000        ; Turn off sprite 0
  66. dc.w    $0128,$0000,$012a,$0000        ; Turn off sprite 0
  67. dc.w    $012c,$0000,$012e,$0000        ; Turn off sprite 0
  68. dc.w    $0130,$0000,$0132,$0000        ; Turn off sprite 0
  69. dc.w    $0134,$0000,$0136,$0000        ; Turn off sprite 0
  70. dc.w    $0138,$0000,$013a,$0000        ; Turn off sprite 0
  71. dc.w    $013c,$0000,$013e,$0000        ; Turn off sprite 0
  72.  
  73. dc.w    $ffe1,$fffe            ; Wait for line 255, horz.pos
  74.                     ; at right edge of screen
  75.  
  76. dc.w    $0201,$fffe            ; Wait for line 256+2=258.
  77.  
  78. dc.w    $0180,$0808            ; Change background color
  79.  
  80. dc.w    $0401,$fffe            ; Wait for line 256+4=260.
  81.  
  82. dc.w    $0180,$0f0f            ; Change background color
  83.  
  84. dc.w    $0601,$fffe            ; Wait for line 256+6=262
  85.  
  86. dc.w    $0180,$0808            ; Change background color
  87.  
  88. dc.w    $0801,$fffe            ; Wait for line 256+8=264
  89.  
  90. dc.w    $0180,$0000            ; Change background color
  91.  
  92. dc.w    $ffff,$fffe            ; End of copperlist
  93.